#include using namespace std; #include //struct - structure //class - classificaion struct Height { int feet; int inches; }; struct SuperHero { //attributes, data members, members, properties string name; string secretIdentity; string costumeDescription; string power; int age; float weight; Height height; //gender? //SuperHero sidekick; //method - a function that is part of a complex type void display() { cout << "Name: " << name << endl; cout << "Secret Identity: " << secretIdentity << endl; cout << "Age: " << age << endl; cout << "Height: " << height.feet << " ft. " << height.inches << " in." << endl; } }; void getSuperHero(SuperHero& superHero) { cout << "Name? "; getline(cin,superHero.name); cout << "Secret Identity? "; getline(cin,superHero.secretIdentity); cout << "Age? "; cin >> superHero.age; cout << "Height (ft. in.)? "; cin >> superHero.height.feet; cin >> superHero.height.inches; // cin.ignore(1); } void main(int argc, char* argv[]) { //intrinsic - int, float, bool, char, double, short, long, unsigned int //complex types aka user defined types //string, istream, ostream, istringstream, ostringstream, //ifstream, ofstream //ADT - abstract data types - data and operations on the data string s; // s is variable but it is aka an object int i; //i is a variable SuperHero superHero; getSuperHero(superHero); superHero.display(); }